local HorseLogic = require("horse.HorseLogic")


--上下坐骑
function CG_HORSE_MOUNT_HORSE(human)
  HorseLogic.mountHorse(human)
end
--升星和升阶
function CG_HORSE_LV_UP(human, msg)
  if msg.type == 0 then
    HorseLogic.starUp(human, msg.autoBuy, msg.itemIndex)
  elseif msg.type == 1 then
    HorseLogic.stageUp(human, msg.autoBuy)
  else
    return
  end
end
--激活幻化坐骑
function CG_HORSE_JIHUO_HUANHUA(human, msg)
  HorseLogic.jihuo(human, msg.id)
end
--幻化坐骑形象
function CG_HORSE_HUANHUA_HORSE(human, msg)
  HorseLogic.huanhua(human, msg.id)
end

function CG_GET_HORSE_INFO(human)
  HorseLogic.sendHorseStatus(human)
  HorseLogic.sendHorseList(human)
  HorseLogic.sendHorseInfo(human)
  HorseLogic.sendHuanhuaList(human)
end
--批量使用升星道具
function CG_HORSE_BATCH_USE_ITEM(human, msg)
  HorseLogic.batchUse(human, msg.cnt, msg.isAutoBuy, msg.itemIndex)
end

--升级指定等阶坐骑的星星
function CG_HORSE_XX_UP(human, msg)
  if msg.stage ~= 0 then
    HorseLogic.xxUp(human, msg.stage)
  elseif msg.huanhuaId ~= 0 then
    HorseLogic.HhXxUp(human, msg.huanhuaId)
  end
end

--铁骑装备提品
function CG_HORSE_EQUIP_UPGRADE_QUALITY(human, msg)
  HorseLogic.equipUpQua(human, msg.horseId)
end
--铁骑装备合成
function CG_HORSE_EQUIP_HECHENG(human, msg)
  HorseLogic.equipHeCheng(human, msg.horseId, msg.equipId)
end

function CG_HORSE_FEED_QUERY(human, msg)
  HorseLogic.feedQuery(human, msg.id)
end

function CG_HORSE_FEED(human, msg)
  HorseLogic.feed(human, msg.id)
end

function CG_HORSE_MULTI_FEED(human, msg)
  HorseLogic.feedMulti(human, msg.id, msg.cnt)
end